<!DOCTYPE html>
<html lang="en">
<!-- 古韵超市 · 订单详情页面 -->
<?php
//判断是否非法访问
session_start();
if (!isset($_SESSION['USERINFOS'])) {
    echo "<script>alert('非法访问！');window.location.href='login_reg.html';</script>";
    exit();
}
?>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>古韵超市 · 历史订单</title>
    <link rel="stylesheet" href="bootstrap-5.3.3-dist/bootstrap.min.css">
    <script src="bootstrap-5.3.3-dist/bootstrap.min.js"></script>
    <link rel="stylesheet" href="css/u_public.css">
    <link rel="stylesheet" href="css/history_order.css">
</head>

<body>
    <!-- 导航 -->
    <div class="navbar fixed-top">
        <nav class="navbar navbar-expand-lg navbar-light bg-light" id="navbar">
            <div class="container-fluid">
                <div class="logo_div">
                    <img src="img/LOGO.png">
                </div>
                <a class="navbar-brand" href="#">古韵超市网上购物系统</a>
                <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
                    data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
                    aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                        <li class="nav-item">
                            <a class="nav-link" href="../index.php">首页</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="u_all_goods.php">所有商品</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="u_mycart.php">我的购物车</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="u_show_order.php">我的订单</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link active" aria-current="page" href="javscript:void(0);">历史订单</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="u_personal_info.php">我的信息</a>
                        </li>
                    </ul>
                    <div class="infobox">
                        当前登录：
                        <?php echo $_SESSION['USERINFOS']['uname']; ?> |
                        <a href="php/logout.php">退出登录</a>
                    </div>
                </div>
            </div>
        </nav>
    </div>
    <main>
        <div class="history_title">
            <h4>我的历史订单列表</h4>
        </div>
        <table class="table table-striped table-hover">
            <thead>
                <tr>
                    <th scope="col">订单编号</th>
                    <th scope="col">收货人</th>
                    <th scope="col">收货地址</th>
                    <th scope="col">联系方式</th>
                    <th scope="col">商品名称</th>
                    <th scope="col">下单数量</th>
                    <th scope="col">商品单价</th>
                    <th scope="col">交易金额</th>
                    <th scope="col">下单时间</th>
                    <th scope="col">发货时间</th>
                    <th scope="col">收货/取消时间</th>
                    <th scope="col">当前状态</th>
                </tr>
            </thead>
            <tbody>
                <?php
                    include_once("php/get_history_order.php");
                ?>
            </tbody>
        </table>
    </main>
    <footer class="fixed-bottom">
        古韵超市网上购物系统© 2025® All Rights Reserved.
    </footer>
</body>

</html>